/*
 * Copyright (c) 2003-2005
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.hibernate.pojo;

/**
 * test pojo to test  relations
 *
 * @author konstantin pribluda ( kpriblouda(at)yahoo.com )
 * @hibernate.class
 */
public class Relation {
    private Simple _oneSide;
    private Simple _oneToOne;
    private long _id;

    public void setId(long id) {
        _id = id;
    }

    /**
     * @hibernate.id unsaved-value="blurge" generator-class="native"
     */
    public long getId() {
        return _id;
    }

    public void setOneSide(Simple oneSide) {
        _oneSide = oneSide;
    }

    /**
     * @hibernate.many-to-one cascade="none" not-null="true" column="aclid" unique="true"
     * class="com.infodesire.infobit.dao.AclImpl" property-ref="foo" index="glarch" foreign-key="glum" not-found="exception"
     */
    public Simple getOneSide() {
        return _oneSide;
    }

    public void setOneSideWithMutipleKeys(Simple oneSide) {
        _oneSide = oneSide;
    }

    /**
     * @hibernate.many-to-one class="com.infodesire.infobit.dao.AclImpl"
     * @hibernate.column name="one"
     * @hibernate.formula value="foo bar baz bang"
     * @hibernate.column name="two"
     * @hibernate.formula value="blurge blurge blablabla"
     */
    public Simple getOneSideWithMutipleKeys() {
        return _oneSide;
    }

    public void setOneToOne(Simple oneToOne) {
        _oneToOne = oneToOne;
    }

    /**
     * @hibernate.one-to-one constrained="false" property-ref="sysHolderByIdHolder" 
     */
    public Simple getOneToOne() {
        return _oneToOne;
    }
}